package com.spzx.product.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.spzx.product.domain.SkuStock;
import io.swagger.v3.oas.annotations.Parameter;
import org.springframework.data.repository.query.Param;
import org.springframework.jmx.export.annotation.ManagedOperationParameter;

/**
 * ClassName: SkuStockMapper
 * Package: com.spzx.product.mapper
 * Description:
 *
 * @Author ycy
 * @Create 2024/8/13 16:43
 * @Version 1.0
 */
public interface SkuStockMapper extends BaseMapper<SkuStock> {


    SkuStock check(@Param("skuId") Long skuId, Integer skuNum);

    Integer lock(@Param("skuId") Long skuId, Integer skuNum);

    Integer unlock(@Param("skuId") Long skuId,@Param("num") Integer num);

    Integer minus(@Param("skuId") Long skuId,@Param("num") Integer num);
}
